﻿using CPFUI;
using CPFUI.IControl;

namespace CPFUIDemo
{
    public class Window5 : BaseWindow
    {
        protected override void InitializeComponent()
        {
            LoadStyleFile("res://CPFUIDemo/Stylesheet1.css");
            CornerRadius = "6";
            //加载样式文件，文件需要设置为内嵌资源
            if (!DesignMode)//设计模式下不执行，也可以用#if !DesignMode
            {
                
            }
            base.InitializeComponent();
            ContentPanel.Children.Add(new TextBoxEx {IsSingleLine=true, Width = 120,MarginTop=50 });
            ContentPanel.Children.Add(new TextBoxEx { IsSingleLine=false, Width = 120, Height = 30, MarginTop = 100 });
            ContentPanel.Children.Add(new TextBlockEx {Width = 120, Height = 30, MarginTop = 140,Text="12345" });
        }
#if !DesignMode //用户代码写到这里，设计器下不执行，防止设计器出错
        protected override void OnInitialized()
        {
            base.OnInitialized();

        }
        //用户代码

#endif
    }
}
